package cn.seventhquestion;

import com.sun.javaws.IconUtil;

public class Voter {
    private static String name;
    private static int ticket;
    private static  final int maxTicket=100;

    public Voter(){

    }

    public Voter(String name) {
        this.setName(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void show(){
        if (ticket==maxTicket){
            System.out.println("已经到100票了，不能再投票了");
        }else {
            System.out.println("谢谢"+ name+"的投票");
            ticket++;
        }
    }
}
